package com.xu.t1.model;

import java.util.List;

public class PageResult<T> {
    private int total;      // 总记录数
    private List<T> data;   // 当前页数据列表
    private String source;  //数据来源

    public PageResult() {
        // 无参构造器，Jackson反序列化
    }

    public PageResult(int total, List<T> data) {
        this.total = total;
        this.data = data;
    }

    // Getter 和 Setter
    public int getTotal() {
        return total;
    }
    public void setTotal(int total) {
        this.total = total;
    }
    public List<T> getData() {
        return data;
    }
    public void setData(List<T> data) {
        this.data = data;
    }
    public String getSource(){
        return source;
    }
    public void setSource(String source){
        this.source = source;
    }
}